<?php

use Illuminate\Support\Facades\Route;
use Illuminate\Http;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

// 返回文本信息
Route::get('/content1', function () {
    return 'https://aux.dhl.com/bca-admin/login';
});


// 返回多行文本
Route::get('/content2', function () {
    $zpl = <<<data
多行文本内容
data;
    return $zpl;
});

// 读取文件内容
Route::get('/content3', function () {
    $zpl = File::get(storage_path("app/data.zpl"));
    return $zpl;
});

Route::get('dl/guns', function () {
    return response()->download(storage_path('app/schema/app.sql'), 'guns.sql');
});

